<template>
  <div id="app_index" class="app-container home">
    <!-- 我方管理员-数据控制台 id: 100 -->
    <consoleDataWe v-if="userMsg.userType == 1" />
    <!-- 甲方账号-管理员 userMsg.message.isHeader == 1 -->
    <indexFirst v-else-if="userMsg.userType == 2" />
    <!-- 甲方账号-业务员 userMsg.message.isHeader == 1 -->
    <indexSecond v-else-if="userMsg.userType == 3" />
  </div>
</template>

<script>
import consoleDataWe from '../views/business/consoleDataWe/index.vue'
import indexFirst from '../views/business/consoleDataWe/indexFirst.vue'
import indexSecond from '../views/business/consoleDataWe/indexSecond.vue'
// import resize from './dashboard/mixins/resize'

export default {
  name: 'Index',
  components: { consoleDataWe, indexFirst, indexSecond },
  data() {
    return {
      // 表达统计主体
      statisticsDta: {},
      // 查询参数
      dataTotalBo: {
        pageNum: 1,
        pageSize: 999
      },
      minHeight: 100
    }
  },
  computed: {
    // 后台配置项
    userMsg() {
      return this.$store.state.user
    }
  },
  created() {
  },
  mounted() {
    this.minHeight = document.body.clientHeight
  },
  methods: {
    goTarget(href) {
      window.open(href, '_blank')
    }
  }
}
</script>

<style lang="scss">

#app_index {
  background: #f4f4fe;
  padding: 0px;
  font-size: 13px;
  color: #676a6c;
  overflow: hidden;
  .statistics_border {
    padding: 20px;
  }
  .box_border{
    overflow: hidden;
    border-radius: 8px;
    background: #fff;
  }
}

#consoleDataWe{
    background: #f4f4fe;
    padding: 0 29.25px;
    text-align: center;
    padding-bottom: 40px;
    .data_top_title{
        padding: 0.1538rem 0rem;
        .el-icon-question{
            font-size: 15px;
            margin: 0px 10px;
            cursor: pointer;
        }
        >div>i{
            display: block;
            width: 0.0615rem;
            height: 0.30rem;
            background: #918ef9;
            border-radius: 0.0462rem;
            margin-top: 0.0308rem;
        }
        p{
            display: block;
            font-weight: 900;
            line-height: 0.5538rem;
            height: 0.5538rem;
            color: #333;
            margin-left: 0.1538rem;
            font-size: 0.2769rem;
            margin-top: 2px;
        }
        .date_type{
            p{
                margin: 0;
                cursor: pointer;
                display: block;
                padding: 0 0.1rem;
                position: relative;
                font-weight: 500;
                color: #666;
                font-size: 0.265rem;
                min-width: 0.4923rem;
                >i{
                    display: block;
                    position: absolute;
                    width: 40%;
                    height: 4px;
                    left: 0;
                    right: 0;
                    margin: 0 auto;
                    bottom: 0;
                    background: #fff;
                    border-radius: 10px;
                }
                &:last-child{
                    padding-right: 0;
                    min-width: 0.7rem;
                }
            }
            .dateActive{
                font-weight: 700;
                color: #918ef9;
                font-size: 0.265rem;
                >i{
                    background: #918ef9 !important;
                }
            }

        }
        .paixBorder{
            padding-top: 0.1231rem;
            flex-direction: column;
            display: flex;
            height: 0.5538rem;
            transform: translateY(0.01rem);

            .el-icon-bottom{
                cursor: pointer;
                font-size: 0.3385rem;
            }
        }
        .icon-sort-up-full, .icon-sort-down-full{
            display: block;
            height: 0.1rem;
            font-size: 0.24rem;
            color: #c7cbd1;
            cursor: pointer;
            -webkit-filter: none !important; /* Chrome, Safari, Opera */
            filter: none !important;
        }
        .icon-sort-down-full{
            transform: translateY(-0.08rem);
        }

    }
    .data_top_center{
        .data_top_list{
            width: 100%;
            margin-right: 0.43rem;
            &:nth-child(1){
                .data_back{
                    background: linear-gradient(45deg, #CD86FE 0%, #49DAF8 100%);
                    box-shadow: 0rem 0.2rem 0.45rem 0.08rem rgba(138,177,251,0.3000);
                }
            }
            &:nth-child(2){
                .data_back{
                    background: linear-gradient(45deg, #FE5B9C 0%, #FEAB65 100%);
                    box-shadow: 0rem 0.2rem 0.45rem 0.08rem rgba(254,127,131,0.3000);
                }
            }
            &:nth-child(3){
                .data_back{
                    background: linear-gradient(45deg, #18B9A0 0%, #49E39A 100%);
                    box-shadow: 0rem 0.2rem 0.45rem 0.08rem rgba(50,208,157,0.3000);
                }
            }
            &:nth-child(4){
                .data_back{
                    background: linear-gradient(45deg, #9E51FC 0%, #DB87FE 100%);
                    box-shadow: 0rem 0.2rem 0.45rem 0.08rem rgba(190,110,253,0.3000);
                }
            }
            &:nth-child(5){
                margin-right: 0px;
                .data_back{
                    background: linear-gradient(45deg, #2E6CF6 0%, #2EC9F6 100%);
                    box-shadow: 0rem 0.2rem 0.45rem 0.08rem rgba(46,155,246,0.3000);
                }
            }
            .data_back{
                border-radius: 0.1231rem;
                padding: 0.32rem 0.3385rem 0rem 0rem;
                padding-bottom: 0.20rem;
                min-height: 1.6923rem;
                p{
                    color: #FFFFFF;
                    font-weight: 500;
                    text-align: right;
                }
                .data_back_p1{
                    font-size: 0.2308rem;
                }
                .data_back_p2{
                    margin-top: 0.19rem;
                    font-size: 0.3385rem;
                    span{
                        font-size: 0.2154rem;
                    }
                }
            }

            .data_text{
                color: #071E51;
                margin-top: 0.25rem;
                margin-bottom: 0.25rem;
                font-size: 0.2308rem;
                text-align: left;
                padding-left: 0.35rem;
                font-weight: 700;
                height: 0.7692rem;
                .data_text_p1{
                    font-weight: 400;
                }
                .data_text_p2{
                    font-size: 0.2769rem;
                }
            }

        }
    }
    .statistics_left{
        width: 70%;
    }
    .statistics_right{
        width: 28%;
        margin-left: 2%;
        .zhanwei{
            display: block;
            width: 2.5385rem;
            margin: 0 auto;
        }
    }
    .timeQuery{
        width: 70px;
        height: 32px;
        line-height: 32px;
        background: #fff;
        margin-left: 16px;
        border-radius: 4px;
        cursor: pointer;
        &:hover {
            background: #30a9ff;
            color: #fff;
        }
    }
    .rankBorder{
        overflow-y: auto;
        padding: 0.2rem 0.37rem 0rem;
        .rank_list{
            p{
                display: block;
                font-size: 0.37rem;
                font-weight: 500;
                color: #071E51;
                line-height: 0.37rem;
                height: 0.37rem;
            }
            .xiantiao{
                width: 100%;
                height: 0.09rem;
                background: #F1F4F9;
                border-radius: 0.05rem;
                margin-top: 0.17rem;
                margin-bottom: 0.49rem;
                position: relative;
                border-radius: 0.1538rem;
                overflow: hidden;
                .xtwidth{
                    width: 10%;
                    height: 0.09rem;
                    position: absolute;
                    border-radius: 0.1538rem;
                    left: 0;
                    top: 0;
                    background: linear-gradient(45deg, #2E6CF6 0%, #2EC9F6 100%);
                }
            }
            &:nth-child(1), &:nth-child(2), &:nth-child(3){
                .xtwidth{
                    background: linear-gradient(45deg, #CD86FE 0%, #49DAF8 100%);
                }
            }
            &:nth-child(4), &:nth-child(5), &:nth-child(6){
                .xtwidth{
                    background: linear-gradient(45deg, #FE5B9C 0%, #FEAB65 100%);
                }
            }
            &:nth-child(7), &:nth-child(8), &:nth-child(9){
                .xtwidth{
                    background: linear-gradient(45deg, #18B9A0 0%, #49E39A 100%);
                }
            }
            &:nth-child(10), &:nth-child(11), &:nth-child(12){
                .xtwidth{
                    background: linear-gradient(45deg, #9E51FC 0%, #DB87FE 100%);
                }
            }
        }
        .rank_text1{
            min-width: 150px;
            text-align: right;
            font-size: 0.25rem !important;
        }
        .rank_text_title{
            width: 200px;
            text-align: left;
        }
    }
    // element时间选择器
    .el-input__inner{
        border: 1px solid #fff;
    }
}
</style>

<style lang="scss">
//滚动条样式
.rankBorder::-webkit-scrollbar {
    width: 4px;
    height: 4px;
}
.rankBorder::-webkit-scrollbar-track-piece {
    background-color: transparent; //滚动槽
    -webkit-border-radius: 4px;
}
.rankBorder::-webkit-scrollbar-thumb:vertical {
    height: 4px;
    background-color: #BDBDBD;
    -webkit-border-radius: 4px;
}
.rankBorder::-webkit-scrollbar-thumb:horizontal {
    width: 4px;
    background-color: #BDBDBD;
    -webkit-border-radius: 4px;
}
//滚动条鼠标移上去的样式
.rankBorder::-webkit-scrollbar-thumb:vertical:hover,::-webkit-scrollbar-thumb:horizontal:hover
{
    background-color: #BDBDBD;
}
</style>
